#!/usr/bin/python
# -*- coding:utf-8 -*-
from sqlalchemy import *
from sqlalchemy.orm import *
from model.config import *


class Mysql(object):
    __session__ = null

    def __init__(self):
        engine = create_engine(
            sql + '://' + username + ':' + password + '@' + host + '/' + dbname + '?charset=' + encode, echo=False)
        Session = sessionmaker(bind=engine)
        self.__session__ = Session()

    def getSession(self):
        return self.__session__

